﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="ReducingBalance.aspx.cs" Inherits="Reports_ReducingBalance" %>

<%@ Register assembly="Microsoft.ReportViewer.WebForms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" namespace="Microsoft.Reporting.WebForms" tagprefix="rsweb" %>
<%@ Register TagPrefix="ln" Namespace="Web.UI.CustomControls" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" Runat="Server">
    <title>Reducing Balance Report</title>
    <link rel="Stylesheet" href="../Styles/MessageBoxes.css" type="text/css" />
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" Runat="Server"> 
    <div>
        <h3>Reducing Balance Loans&nbsp; Projected Interest Report</h3>
    </div>
    <div class="container span9">
        <div class="well">
            <fieldset>
                <div class="control-group">
                    <asp:Label AssociatedControlID="txtReportDate" CssClass="control-label" ID="lblTermDate" runat="server" Text="Report for"></asp:Label>
                    <div class="controls">
                        <div class="input-append date" runat="server" id="reportDateContainer">
                          <input id="txtReportDate" runat="server" class="span2" readonly/>
                          <span class="add-on"><i class="icon-calendar"></i></span>
                        </div>
                    </div>
                </div>
                <div class="control-group">
                    <asp:Label ID="lblStatus" runat="server" Text="" Visible="False"></asp:Label>
                </div>
                <div class="form-actions">
                    <asp:Button ID="btnRunReport" runat="server" CssClass="btn btn-primary" onclick="btnRunReport_Click" 
                    Text="Run Report" />
                </div>
            </fieldset>
        </div>
    </div>
    <div id="reportContainer" runat="server" class="container span11">
        <div class="well">
            <rsweb:ReportViewer ID="rvLoan" runat="server" Font-Names="Verdana" 
                Font-Size="8pt" InteractiveDeviceInfos="(Collection)" 
                WaitMessageFont-Names="Verdana" WaitMessageFont-Size="14pt" Width="8in" 
                Height="11in" DocumentMapWidth="25px" 
                ShowFindControls="False" SizeToReportContent="True" 
                onreporterror="rvLoan_ReportError">
                <LocalReport ReportPath="Reports\ReducingInterestLoanReport.rdlc" 
                    DisplayName="Red Bal Interest Report">
                    <DataSources>
                        <rsweb:ReportDataSource DataSourceId="odsLoans" Name="LoanDatasetRBM" />
                    </DataSources>
                </LocalReport>
            </rsweb:ReportViewer>
            <div class="error" ID="errorMessage" runat="server" visible="false"></div>
            <asp:ObjectDataSource ID="odsLoans" runat="server" OnSelecting="odsLoans_Selecting"
                OldValuesParameterFormatString="original_{0}" SelectMethod="GetData" 
            
                
                TypeName="loanDataSetTableAdapters.GetAllInterestForMonthRedBalTableAdapter">
                <SelectParameters>
                    <asp:Parameter  Name="report_date" Type="DateTime" />
                </SelectParameters>
            </asp:ObjectDataSource>
        </div>
    </div>
</asp:Content>
<asp:Content runat="server" ID="EndSciptContent" ContentPlaceHolderID="EndScriptsPlaceHolder">
    <script type="text/javascript">
        $(document).ready(function () {
            $("#<%=reportDateContainer.ClientID%>").datepicker({ format: 'dd-mm-yyyy', autoclose: true, todayBtn: true });
            //document.getElementById('<%=txtReportDate.ClientID %>').value = '22-07-1988';
        });
    </script>    
</asp:Content>
